
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/template.css">
		<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.10.0.custom.css" />
		<script type="text/javascript" src="JQuery/jquery-1.9.0.min.js"></script>
		<script type="text/javascript" src="JQuery/jquery-ui-1.10.0.custom.js"></script>	
		<script type="text/javascript" src="JS/GradeTest.js"></script>	
		<title>Grade Test</title>
	</head> 
	<body>
		<?php
			require_once('webservices.php');
			
			$TestRecordID = $_POST["RecordID"];
			unset($_POST["RecordID"]);
			
			foreach($_POST as $question => $point)
			{
				Grade_student_answer($question, $TestRecordID, $point);
			}
			
			Grade_student_test($TestRecordID);
			
		?>

	<div id="ConfirmDialog" class="dialog" title="Grading Completed" style="display:none;" testid="<?php echo $TestRecordID; ?>">
		<img src="images/Process-success.png" id="DialogIcon" class="DialogIcon" /><span id="DialogMessage" class="DialogMessage">You have succesfuly graded the test. You will redirected back to the home page</span>
	</div>
	<div id="PostGradeDialog" class="dialog" title="Post Grade" style="display:none;">
		<img src="images/Processing.png" class="DialogIcon" /><span class="DialogMessage">Do you want the grade to be immediately visible to the student?</span>
	</div>
	</body>
			
</html>



